package com.dt.dubai.mech.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;

import java.util.Date;

/*
 * 商户优惠活动记录表
 */

@Data
@Table(name = "dt_mech_marketing_activity")
@EqualsAndHashCode(callSuper = false)
public class MechMarketingActivityEntity extends BaseEntity {

    //商户登录记录ID
    @NotNull(message = "adminLoginRecordId参数不能为空")
    Long adminLoginRecordId;

    //类型 1-电商,2-检测,3-计量
    Short commodityType;

    //活动名称
    @NotNull(message = "activityName参数不能为空")
    @Length(min = 0, max = 100, message = "activityName参数最大长度不100")
    String activityName;

    //活动标题
    @NotNull(message = "activityTitle参数不能为空")
    @Length(min = 0, max = 100, message = "activityTitle参数最大长度不100")
    String activityTitle;

    //活动内容
    @Length(min = 0, max = 500, message = "activityContent参数最大长度不500")
    String activityContent;

    //活动banner
    @Length(min = 0, max = 320, message = "activityBannerUrl参数最大长度不320")
    String activityBannerUrl;

    //活动开始时间
    Date startTime;

    //活动结束时间
    Date endTime;

    //是否发布 1-未发布,2-已发布
    Short yesRelease;

    //备注
    @Length(min = 0, max = 100, message = "remarks参数最大长度不100")
    String remarks;


}
